// Package ToGif write a gif anim to a file with name specified by fileName
package ToGif

import (
	"image/gif"
	"os"
)

func ToGIF(fileName string, anim gif.GIF) {
	f, err := os.Create(fileName)
	if err != nil {
		panic(err)
	}
	defer f.Close()
	gif.EncodeAll(f, &anim) // NOTE: ignoring encoding errors
}
